-- enough_search_point
-- created by panyl
-- 探索点是否足够问题

return {
    fetch = function(id)
        return true;
    end,

    calc_bonus = function(id)
        local args = PinocchioM.query_quetion(id, "bonus_args") or {};

        return { 2, "search_point", args["search_point"], };
    end,

    check_answer = function(id, index)
        local cond = PinocchioM.query_quetion(id, "condition");

        if type(cond) ~= "number" or cond <= 0 then
            return 1;
        end

        -- 是否选择了正确的选项
        local res = iif(ME.user:queryAttrib("search_point") >= cond, 1, 2);

        return iif(res == index, 1, 0);
    end,
};
